package dt.inlee.common.encoder;

import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * Servlet implementation class JxlSeverlet
 */
public class JxlSeverlet extends HttpServlet {
	private static final long serialVersionUID = 1L;
       
    /**
     * @see HttpServlet#HttpServlet()
     */
    public JxlSeverlet() {
        super();
        // TODO Auto-generated constructor stub
    }

	/**
	 * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
	 */
	@SuppressWarnings("static-access")
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		TestInport t = new TestInport();
		String head = "测度表";
		String name[] = {"gee1","daajdl2"};
		List<String> val = new ArrayList<String>();
		val.add("一");
		val.add("二");
		val.add("三");
		String cycle= "5";
		int[] cols ={1,2,3};
		String[] totleNum = {"a","b","c"};
		try {
			t.excelWithTitleFoot(response, head, name, val, cycle, cols, totleNum);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

	/**
	 * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
	 */
	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		// TODO Auto-generated method stub
		doGet(request,response);
	}

}
